package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RoomCategoryMapper;
import com.ruoyi.system.domain.RoomCategory;
import com.ruoyi.system.service.IRoomCategoryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 房间类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-04-15
 */
@Service
public class RoomCategoryServiceImpl implements IRoomCategoryService 
{
    @Autowired
    private RoomCategoryMapper roomCategoryMapper;

    /**
     * 查询房间类型
     * 
     * @param categoryId 房间类型ID
     * @return 房间类型
     */
    @Override
    public RoomCategory selectRoomCategoryById(Integer categoryId)
    {
        return roomCategoryMapper.selectRoomCategoryById(categoryId);
    }

    /**
     * 查询房间类型列表
     * 
     * @param roomCategory 房间类型
     * @return 房间类型
     */
    @Override
    public List<RoomCategory> selectRoomCategoryList(RoomCategory roomCategory)
    {
        return roomCategoryMapper.selectRoomCategoryList(roomCategory);
    }

    /**
     * 新增房间类型
     * 
     * @param roomCategory 房间类型
     * @return 结果
     */
    @Override
    public int insertRoomCategory(RoomCategory roomCategory)
    {
        return roomCategoryMapper.insertRoomCategory(roomCategory);
    }

    /**
     * 修改房间类型
     * 
     * @param roomCategory 房间类型
     * @return 结果
     */
    @Override
    public int updateRoomCategory(RoomCategory roomCategory)
    {
        return roomCategoryMapper.updateRoomCategory(roomCategory);
    }

    /**
     * 删除房间类型对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteRoomCategoryByIds(String ids)
    {
        return roomCategoryMapper.deleteRoomCategoryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除房间类型信息
     * 
     * @param categoryId 房间类型ID
     * @return 结果
     */
    @Override
    public int deleteRoomCategoryById(Integer categoryId)
    {
        return roomCategoryMapper.deleteRoomCategoryById(categoryId);
    }
}
